import { CodeBlock } from '@theme';
import CJSTemplate from '../../../../../templates/webpack.config.cjs?raw';
import ESMTemplate from '../../../../../templates/webpack.config.mjs?raw';

# Templates

:::info

Webpack config templates are also available on GitHub repo under [`templates/` directory](https://github.com/callstack/repack/tree/main/templates).

:::

## ESM template (recommended)

Recommended extensions for the config: `.mjs` or `.js`, for example: `webpack.config.mjs`.

<CodeBlock language="js" title="webpack.config.mjs">
  {ESMTemplate}
</CodeBlock>

## CJS templates

Recommended extensions for the config: `.cjs` or `.js`, for example: `webpack.config.cjs`.

<CodeBlock language="js" title="webpack.config.cjs">
  {CJSTemplate}
</CodeBlock>
